<style>
    .form-item-plant-id label {
        display: block;
        float: left;
    }
</style>
<div class="hp-tab-newprd">
    <ul class="j-sw-nav">
        <?php if(!$form['#farmer'] && !$form['#addr_id']){?>
<!--            <li class="newprd-s1 tab-li"><a href="--><?php //echo base_path();?><!--plant_measure/list">查看</a></li>-->
<!--            --><?php //if(user_access('add plant_measure')){?>
<!--                <li class="newprd-s2 tab-li"><a href="--><?php //echo base_path();?><!--plant_measure/add">添加</a></li>-->
<!--            --><?php //}
            if (user_access('manage plant_measure_item')) {?>
                <li class="newprd-s3 tab-li on"><a href="<?php echo base_path();?>plant_measure_item/list">测产项目</a></li>
            <?php }
        }?>
    </ul>
    <div class="newprd-s1">

        <div class="table-div">
            <div class="search-div">
                <div style="float: left;width: 300px;"><div class="search-label" style="width: 100px;">作物:</div><?php print render($form['plant']); ?></div>
                <div>
                    <?php print render($form['new_plant']); ?>
                </div>
                <div class="search-submit" style="clear: both;float: left;margin-left: 55px"><?php print render($form['submit']); ?></div>
                <ul class="table-ul-li">
                    <li style=""><a href="<?php echo base_path(); ?>plant_measure/add">
                            <input class="btn btn-primary form-submit" type="button"  value="返回">
                        </a></li>
                </ul>
                <div style="clear: both"></div>
            </div>
            <img class="res-search" src='<?php echo base_path();?>sites/all/themes/tweme/images/images/res.png'>
            <div class="table-div">
                <?php print render($form['table']); ?>
            </div>
        </div>
    </div>
</div>

<?php print drupal_render_children($form); ?>
</div></form>
<div>
    <div class="modal fade" id="plantMeasureModalNew" tabindex="-1" role="dialog" aria-labelledby="plantMeasureModalNew" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close"
                            data-dismiss="modal" aria-hidden="true">
                        &times;
                    </button>
                    <h4 class="modal-title" id="myModalLabel">
                        添加测产项目
                    </h4>
                </div>
                <div class="modal-body">
                    <?php echo @render(drupal_get_form('add_plant_measure_item_form')); ?>
                </div>
            </div>
        </div>
    </div>
</div>

<div>
    <div class="modal fade" id="plantMeasureModalEdit" tabindex="-1" role="dialog" aria-labelledby="plantMeasureModalEdit" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close"
                            data-dismiss="modal" aria-hidden="true">
                        &times;
                    </button>
                    <h4 class="modal-title" id="myModalLabel">
                        修改测产项目
                    </h4>
                </div>
                <div class="modal-body">
                    <?php echo @render(drupal_get_form('edit_plant_measure_item_form')); ?>
                </div>
            </div>
        </div>
    </div>
</div>

<form><div>


        <script type="text/javascript">
            function onEditSelect(id) {
                jQuery('[name=plant_measure_item_id]').val(id);
            }

        </script>
